/*
#include <iostream>
#include <iterator>
#include <string>
#include <algorithm>

using namespace std;

string in;
string ret;

int main() {
    cin >> in;
    int k = in.size() - 1;
    int _count = 0;
    while (k >= 0)
    {
        ret += in[k];
        if (k != 0)
        {
            _count++;

        }
        if (_count == 3)
        {
            ret += ',';
            _count = 0;
        }
        k--;
    }
    reverse(ret.begin(), ret.end());
    cout << ret;
}*/